﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace FillCartridgeBBB.Models
{
    public class StatesRepository
    {
        private FillCartridgeDbEntities _db;

        public StatesRepository(FillCartridgeDbEntities db)
        {
            _db = db;
        }

        public IEnumerable<State> SelectAll()
        {
            return _db.StateSet;
        }

        public State SelectById(int id)
        {
            return _db.StateSet.Where(st => st.StateId == id).First();
        }

    }
}
